<php>function _get_system_widget($name){</php>
<switch name="name">
    <case value="CmfHub">
        <div class="panel panel-default">
            <div class="panel-heading">
                <h3 class="panel-title">交流方式</h3>
            </div>
            <div class="panel-body home-info">
                <ul class="list-unstyled">
                    <li>
                        <em>官网</em> <span><a href="http://www.thinkcmf.com" target="_blank">www.thinkcmf.com</a></span>
                    </li>
                    <li><em>QQ 群</em> <span>100828313,316669417</span></li>
                    <li><em>联系邮箱</em> <span>catman@thinkcmf.com</span></li>
                </ul>
            </div>
        </div>
    </case>
    <case value="CmfDocuments">
        <div class="panel panel-default">
            <div class="panel-heading">
                <h3 class="panel-title">开发手册</h3>
            </div>
            <div class="panel-body home-info">
                <ul class="list-unstyled">
                    <li>
                        <em>完全开发手册</em>
                        <span>
                            <a class="label label-success" href="http://www.thinkcmf.com/doc.html"
                               target="_blank">立即阅读</a>
                        </span>
                    </li>
                    <li>
                        <em>常见问题手册</em>
                        <span>
                            <a class="label label-success" href="http://www.thinkcmf.com/faq.html"
                               target="_blank">立即阅读</a>
                        </span>
                    </li>
                    <li>
                        <em>模板开发教程</em>
                        <span>
                            <a class="label label-success" href="http://www.thinkcmf.com/theme_tutorial.html"
                               target="_blank">立即阅读</a>
                        </span>
                    </li>
                    <li>
                        <em>API开发手册</em>
                        <span>
                            <a class="label label-success" href="http://www.thinkcmf.com/cmf5api.html"
                               target="_blank">立即阅读</a>
                        </span>
                    </li>
                </ul>
            </div>
        </div>
    </case>
    <case value="MainContributors">
        <div class="panel panel-default">
            <div class="panel-heading">
                <h3 class="panel-title">主要贡献者</h3>
            </div>
            <div class="panel-body home-info">
                <ul class="list-inline">
                    <li>老猫</li>
                    <li>Sam</li>
                    <li>Tuolaji</li>
                    <li>睡不醒的猪</li>
                    <li>小夏</li>
                    <li>Powerless</li>
                    <li>WelKinVan</li>
                    <li>Kane</li>
                    <li>iYting</li>
                    <li>pl125</li>
                    <li>五五</li>
                </ul>
            </div>
        </div>
    </case>
    <case value="Contributors">
        <div class="panel panel-default">
            <div class="panel-heading">
                <h3 class="panel-title">贡献者</h3>
            </div>
            <div class="panel-body home-info">
                <ul class="list-inline">
                    <li>Kin Ho</li>
                    <li><a href="https://www.wzxaini9.cn/" target="_blank">Powerless</a></li>
                    <li>Jess</li>
                    <li>木兰情</li>
                    <li>Labulaka</li>
                    <li><a href="http://www.syousoft.com/" target="_blank">WelKinVan</a></li>
                    <li><a href="http://blog.sina.com.cn/u/1918098881" target="_blank">Jeson</a></li>
                    <li>Yim</li>
                    <li><a href="http://www.jamlee.cn/" target="_blank">Jamlee</a></li>
                    <li>香香咸蛋黄</li>
                    <li><a href="http://www.xdmeng.cn" target="_blank">小凯</a></li>
                    <li>Co</li>
                    <li>Rainfer</li>
                    <li><a href="http://www.yaoweixiu.cn/" target="_blank">Kane</a></li>
                    <li>北岸的云</li>
                    <li>pl125</li>
                    <li><a href="http://www.wuwuseo.com/" target="_blank">五五</a></li>
                </ul>
            </div>
        </div>
    </case>
</switch>
<php>}</php>

<include file="public@header"/>
<style>
    .home-info li em {
        float: left;
        width: 120px;
        font-style: normal;
        font-weight: bold;
    }

    .home-info ul {
        padding: 0;
        margin: 0;
    }

    .panel {
        margin-bottom: 0;
    }

    .grid-sizer {
        width: 10%;
    }

    .grid-item {
        margin-bottom: 5px;
        padding: 5px;
    }

    .col-xs-1, .col-sm-1, .col-md-1, .col-lg-1, .col-xs-2, .col-sm-2, .col-md-2, .col-lg-2, .col-xs-3, .col-sm-3, .col-md-3, .col-lg-3, .col-xs-4, .col-sm-4, .col-md-4, .col-lg-4, .col-xs-5, .col-sm-5, .col-md-5, .col-lg-5, .col-xs-6, .col-sm-6, .col-md-6, .col-lg-6, .col-xs-7, .col-sm-7, .col-md-7, .col-lg-7, .col-xs-8, .col-sm-8, .col-md-8, .col-lg-8, .col-xs-9, .col-sm-9, .col-md-9, .col-lg-9, .col-xs-10, .col-sm-10, .col-md-10, .col-lg-10, .col-xs-11, .col-sm-11, .col-md-11, .col-lg-11, .col-xs-12, .col-sm-12, .col-md-12, .col-lg-12 {
        padding-left: 5px;
        padding-right: 5px;
        float: none;
    }

</style>
</head>
<body>
<style type="text/css">
    .wrap{
        padding:0;
    }
    .layui-body{left: 0px}
    .layui-body .layui-this li a:hover{text-decoration:none;}
    h3{margin-top: 10px}
</style>
<link href="__TMPL__/public/assets/simpleboot3/css/admin.css" rel="stylesheet">
<script src="__TMPL__/public/assets/simpleboot3/js/echarts/echarts.min.js" charset="utf-8"></script>
<script src="__TMPL__/public/assets/simpleboot3/js/adminindex.js"></script>
<div class="wrap">
    <div class="layui-body">
        <div class="layadmin-tabsbody-item layui-show">
            <div class="layui-fluid">
                <div class="layui-row layui-col-space15">
                    <div class="layui-col-md8">
                        <div class="layui-row layui-col-space15" style="margin-bottom: 10px;">
                            <div class="layui-col-md6">
                              <div class="layui-card">
                                <div class="layui-card-header">快捷方式</div>
                                <div class="layui-card-body">
                                   <div class="layui-carousel layadmin-carousel layadmin-shortcut" lay-anim="" lay-indicator="inside" lay-arrow="none" >
                                        <div carousel-item="">
                                          <ul class="layui-row layui-col-space10 layui-this">
                                            <li class="layui-col-xs3">
                                                <a href="javascript:openapp('{:url('/portal/admin_category/index')}','173portal','栏目管理',true);">
                                                  <i class="layui-icon layui-icon-survey"></i>
                                                  <cite>栏目管理</cite>
                                                </a>
                                            </li>
                                            <li class="layui-col-xs3">
                                                <a href="javascript:openapp('{:url('/admin/slide/index')}','78admin','广告管理',true);">
                                                  <i class="layui-icon layui-icon-file-b"></i>
                                                  <cite>广告管理</cite>
                                                </a>
                                            </li>
                                            <li class="layui-col-xs3">
                                                <a href="javascript:openapp('{:url('user/index')}','194user','用户',true);">
                                                  <i class="layui-icon layui-icon-user"></i>
                                                  <cite>用户</cite>
                                                </a>
                                            </li>
                                            <li class="layui-col-xs3">
                                                <a href="javascript:openapp('{:url('/portal/adlist/message')}','194portal','网站信息',true);">
                                                  <i class="layui-icon layui-icon-chat"></i>
                                                  <cite>留言</cite>
                                                </a>
                                            </li>
                                            <li class="layui-col-xs3">
                                                <a href="javascript:openapp('{:url('setting/site')}','71admin','网站信息',true);">
                                                  <i class="layui-icon layui-icon-set"></i>
                                                  <cite>网站信息</cite>
                                                </a>
                                            </li>
                                            <li class="layui-col-xs3">
                                                <a href="javascript:openapp('{:url('recycle_bin/index')}','58admin','回收站',true);">
                                                  <i class="layui-icon layui-icon-delete"></i>
                                                  <cite>回收站</cite>
                                                </a>
                                            </li>
                                            <li class="layui-col-xs3">
                                                <a href="javascript:openapp('{:url('arctype/arc_index')}','193admin','频道模型',true);">
                                                  <i class="layui-icon layui-icon-spread-left"></i>
                                                  <cite>频道模型</cite>
                                                </a>
                                            </li>
                                            
                                        </ul>
                                    </div>
                                </div>
                              </div>
                            </div>
                        </div>
                        <div class="layui-col-md6">
                        <style type="text/css">
                            .layadmin-backlog .layadmin-backlog-body{padding: 2px 15px;}
                        </style>
                        <div class="layui-card">
                            <div class="layui-card-header">待办事项</div>
                            <div class="layui-card-body">
                              <div class="layui-carousel layadmin-carousel layadmin-backlog">
                                <div carousel-item="">
                                  <ul class="layui-row layui-col-space10 layui-this">
                                    <li class="layui-col-xs6">
                                      <a lay-href="app/content/comment" class="layadmin-backlog-body">
                                        <h3>文章数量</h3>
                                        <p><cite>{$MainCom.PortalCount}</cite></p>
                                      </a>
                                    </li>
                                    <li class="layui-col-xs6">
                                      <a href="{:url('recycle_bin/index')}" class="layadmin-backlog-body">
                                        <h3>回收站文章</h3>
                                        <p><cite>{$MainCom.DelRecycle}</cite></p>
                                      </a>
                                    </li>
                                    <li class="layui-col-xs6">
                                      <a lay-href="template/goodslist" class="layadmin-backlog-body">
                                        <h3>留言</h3>
                                        <p><cite>{$MainCom.Message}</cite></p>
                                      </a>
                                    </li>
                                    <li class="layui-col-xs6">
                                      <a href="javascript:;" class="layadmin-backlog-body">
                                        <h3>文章浏览量</h3>
                                        <p><cite>{$MainCom.HitsArr}</cite></p>
                                      </a>
                                    </li>
                                  </ul>
                                  <ul class="layui-row layui-col-space10">
                                    <li class="layui-col-xs6">
                                      <a href="javascript:;" class="layadmin-backlog-body">
                                        <h3>待审友情链接</h3>
                                        <p><cite style="color: #FF5722;">5</cite></p>
                                      </a>
                                    </li>
                                  </ul>
                                </div>
                    
                            </div>
                          </div>
                        </div>
                    </div>
                </div>
                <div class="layui-col-md12 layui-card">
                  <div class="col-lg-12 col-sm-12 col-xs-12" style="padding: 0">
                    <div class="layui-card-header">数据预览</div>
                    <div  class="col-lg-12 col-sm-12 col-xs-12" id="main" style="height:380px;background-color: #fff;padding: 10px;display: inline-block;"></div>
                  </div>
                </div>
            </div>
            <div class="layui-col-md4">
              <div class="layui-card">
                <div class="layui-card-header">版本信息</div>
                <div class="layui-card-body layui-text layadmin-version">
                  <table class="layui-table">
                    <colgroup>
                      <col width="100">
                      <col>
                    </colgroup>
                    <tbody>
                      <tr>
                        <td>模板名称</td>
                        <td>
                          thinkphp
                        </td>
                      </tr>
                      <tr>
                        <td>当前版本</td>
                        <td>
                           {$version}
                        </td>
                      </tr>
                      <tr>
                        <td>php版本</td>
                        <td>
                          {:PHP_VERSION}
                        </td>
                      </tr>
                      <tr>
                        <td>前端框架</td>
                        <td>bootstrap响应式框架</td>
                      </tr>
                    </tbody>
                  </table>
                </div>
              </div>
              <div class="layui-card">
                <div class="layui-card-header">产品动态</div>
                <div class="layui-card-body">
                  <div class="layui-carousel layadmin-carousel layadmin-news">
                    <div carousel-item="">
                      <div class="layui-this"><a href="#" class="layui-bg-blue">简报</a></div>
                    </div>
                    <button class="layui-icon layui-carousel-arrow" lay-type="sub"></button>
                    <button class="layui-icon layui-carousel-arrow" lay-type="add"></button>
                  </div>
                </div>
              </div>

              <div class="layui-card">
                <div class="layui-card-header">
                  作者心语
                </div>
                <div class="layui-card-body layui-text layadmin-text">
                  <p>子曰：“学而时习之，不亦说乎？有朋自远方来，不亦乐乎？人不知而不愠，不亦君子乎？”（《学而》）
                    曾子曰：“吾日三省吾身：为人谋而不忠乎？与朋友交而不信乎？传不习乎？”（《学而》）
                    子曰：“温故而知新，可以为师矣。”（《为政》）
                    子曰：“学而不思则罔,思而不学则殆。”（《为政》）
                    子曰：“由，诲女知之乎！知之为知之，不知为不知，是知也。”（《为政》）
                    子曰：“见贤思齐焉，见不贤而内自省也。”（《里仁》）
                    子曰：“三人行，必有我师焉。择其善者而从之，其不善者而改之。”（《述而》）
                    曾子曰：“士不可以不弘毅，任重而道远。仁以为己任，不亦重乎？死而后已，不亦远乎？”（《泰伯》）
                    子曰：“岁寒，然后知松柏之后凋也。”（《子罕》）
                    子贡问曰：“有一言而可以终身行之者乎？”子曰：“其恕乎！己所不欲，勿施于人。”（《卫灵公》）</p>
                </div>
              </div>
            </div>
        </div>
    </div>
    <script type="text/javascript">
      var tagData = [];
      var myChart = echarts.init(document.getElementById('main'));
      request.baseGet(request.Url({a:"{:url('Main/getmessage')}",p:{id:1}}),function(res) {
        $.each(res.data,function(i,temp){
            if (temp !== undefined) {
                tagData.push(temp.num)
            }
        });
        option = {
            title: {
                text: '堆叠区域图'
            },
            tooltip: {
                trigger: 'axis',
                axisPointer: {
                    type: 'cross',
                }
            },
            legend: {
                data: ['留言数据']
            },
            toolbox: {
                show: true,
                feature: {
                    magicType: {type: ['line', 'bar']},
                },
            },
            grid: {
                left: '3%',
                right: '4%',
                bottom: '3%',
                containLabel: true
            },
            xAxis: [
                {
                    type: 'category',
                    boundaryGap: false,
                    data: ['1月', '2月', '3月', '4月', '5月', '6月', '7月','8月','9月','10月','11月','12月']
                }
            ],
            yAxis: [
                {
                    type: 'value'
                }
            ],
            series: [
                {
                    name: '本月留言数量',
                    type: 'line',
                    stack: '总量',
                    areaStyle: {},
                    emphasis: {
                        focus: 'series'
                    },
                    data: tagData
                },

            ]
        };
        myChart.setOption(option);
      });
    </script>
</div>
</body>
</html>